#include <iostream>
#include <vector>
#include <string>
// #include "MyHash.hpp"
#include <ctime>
#include "my_map_set.hpp"

using namespace my_maphash;
void test_map()
{
    Map<std::string, std::string> map;
    map["hello"] = "你好";
    map["test"] = "测试"; 
    map["student"] = "学生"; 
    map["I"] = "我"; 
    map["you"] = "你"; 
    map["nice"] = "漂亮"; 

    std::string test;
    while (std::cin >> test)
    {
        if (test == "quit") break;
        if (map.find(test) == map.end()) std::cout << "查询不到此中文翻译" << std::endl;
        else std::cout << map[test] << std::endl;
    }

    for (auto &e : map)
    {
        std::cout << e.first << ": " << e.second << " \n";
    }
}

int main()
{
    // close_hash_test();  // 闭散列哈希表测试
    // open_hash_test();  // 开散列哈希桶测试
    // hash_efficiency();// 闭散列-线性探测和开散列效率测试
    test_map();
    
    return 0;
}